/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Nurhat Uca
 * License Type: Evaluation
 */
package org.testis.orm.classes;

import org.orm.*;

public class T_test_log_header {
    public T_test_log_header() {
    }

    public boolean save() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .saveObject(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    public boolean delete() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .deleteObject(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    public boolean refresh() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .getSession().refresh(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    public boolean evict() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .getSession().evict(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    private int id;

    private int designTreeId;

    private int designPartType;

    private int result;

    private Integer parentId;

    private String name;

    private String dateExecuted;

    private String guid;

    private String executionGuid;

    private String parentGuid;

    private void setId(int value) {
	this.id = value;
    }

    public int getId() {
	return id;
    }

    public int getORMID() {
	return getId();
    }

    public void setDesignTreeId(int value) {
	this.designTreeId = value;
    }

    public int getDesignTreeId() {
	return designTreeId;
    }

    public void setDesignPartType(int value) {
	this.designPartType = value;
    }

    public int getDesignPartType() {
	return designPartType;
    }

    public void setResult(int value) {
	this.result = value;
    }

    public int getResult() {
	return result;
    }

    public void setParentId(int value) {
	setParentId(new Integer(value));
    }

    public void setParentId(Integer value) {
	this.parentId = value;
    }

    public Integer getParentId() {
	return parentId;
    }

    public void setName(String value) {
	this.name = value;
    }

    public String getName() {
	return name;
    }

    public void setDateExecuted(String value) {
	this.dateExecuted = value;
    }

    public String getDateExecuted() {
	return dateExecuted;
    }

    public void setGuid(String value) {
	this.guid = value;
    }

    public String getGuid() {
	return guid;
    }

    public void setExecutionGuid(String value) {
	this.executionGuid = value;
    }

    public String getExecutionGuid() {
	return executionGuid;
    }

    public void setParentGuid(String value) {
	this.parentGuid = value;
    }

    public String getParentGuid() {
	return parentGuid;
    }

    public String toString() {
	return toString(false);
    }

    public String toString(boolean idOnly) {
	if (idOnly) {
	    return String.valueOf(getId());
	} else {
	    StringBuffer sb = new StringBuffer();
	    sb.append("T_test_log_header[ ");
	    sb.append("Id=").append(getId()).append(" ");
	    sb.append("DesignTreeId=").append(getDesignTreeId()).append(" ");
	    sb.append("DesignPartType=").append(getDesignPartType())
		    .append(" ");
	    sb.append("Result=").append(getResult()).append(" ");
	    sb.append("ParentId=").append(getParentId()).append(" ");
	    sb.append("Name=").append(getName()).append(" ");
	    sb.append("DateExecuted=").append(getDateExecuted()).append(" ");
	    sb.append("Guid=").append(getGuid()).append(" ");
	    sb.append("ExecutionGuid=").append(getExecutionGuid()).append(" ");
	    sb.append("ParentGuid=").append(getParentGuid()).append(" ");
	    sb.append("]");
	    return sb.toString();
	}
    }

}
